﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    @*<link href="@Url.Content("~/Content/jquery-ui-1.8.2.custom.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/ui.jqgrid.css")" rel="stylesheet" type="text/css" />*@
    <script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")" type="text/javascript"></script>
    <link href="@Href("~/Content/uploadify.css")" rel="stylesheet" />
    <script src="@Href("~/Scripts/jquery.uploadify-3.1.min.js")" type="text/javascript"></script>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
   @* <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>*@
</head>

<body>
    <div class="page">

        <div id="header"> 
            <div id="menucontainer" style="width:90%">
            <ul class="header_list" id="header_left_list" style="width:300px">
                <li>@Html.ActionLink("首页", "Index", "Home")</li>
                <li>@Html.ActionLink("关于", "About", "Home")</li>
                @if (Request.IsAuthenticated)
                {
                    <li class="header_list">Welcome <b>@Context.User.Identity.Name</b>!
                     @Html.ActionLink("注销", "LogOff", "Account") </li>
                    <li>@Html.ActionLink("账户", "AccountEdit", "Account", new { username = User.Identity.Name }, null)</li>
                    if (User.IsInRole("admin") == false)
                    {
                            <li>@Html.ActionLink("后台管理", "UserManage", "Manage")</li> 
                    }
                    else
                    {
                            <li>@Html.ActionLink("后台管理", "Index", "Admin")</li>
                    }
                }
                else
                {
                    <li > @Html.ActionLink("登录", "LogOn", "Account") </li>
                    <li>@Html.ActionLink("加入猎狗", "Register", "Account")</li>
                }
                </ul>
                <ul class="header_list" id="header_right_list" style="text-align:right;float:right">
                    <li>商城通</li>
                    <li>商城提交</li>
                </ul>
                @*<ul class="header_list" id="menu">
                    <li>@Html.ActionLink("首页", "Index", "Home")</li>
                    <li>@Html.ActionLink("关于", "About", "Home")</li>
                    @if (Request.IsAuthenticated)
                    {
                        <li>@Html.ActionLink("账户", "AccountEdit", "Account", new { username = User.Identity.Name }, null)</li>
                        if (User.IsInRole("admin") == false)
                        {
                            <li>@Html.ActionLink("后台管理", "UserManage", "Manage")</li> 
                        }
                        else
                        {
                            <li>@Html.ActionLink("后台管理", "Index", "Admin")</li>
                        }
                    }
                </ul>*@

            </div>
            <div id="search_form" style="text-align:center">
            <table style="margin-left:30px;">
                <tr>
                    <td><img style="height:32px; margin-right:10px;" src=@Url.Content("~/Content/themes/base/images/smalllogo.png") /></td>
                        
                    
                    <td><input id="searchtext" name="searchtext" type="text" value="" style="width:400px;height:22px;vertical-align:middle;padding:4px 4px 4px 4px;line-height:22px;border:1px solid #b49a49;color:#C2BDBD" /></td>
                        
                    <td><input id="searchbtn" type="image" value="" style="width:66px;height: 32px;font-size: 18px;vertical-align:middle;" src=@Url.Content("~/Content/themes/base/images/searchbutton1.png") /></td>
                   
                </tr>
            </table>
            @*<div id="logo" style="display:inline-block"></div>
            <div style="display:inline-block">*@
                
            </div>
            </div>
        </div>

    <div id="main">
            @RenderBody()
            <div id="footer">
            </div>
        </div>
    <div id="footer" style="color: #909090;font-size:12px;margin: auto;width: 520px;text-align: center;">
        <p>此内容系猎狗根据您的指令搜自各品牌网站，猎狗提倡，保护消费者权益。</p>
        <hr />
        <p>52L9.com版权所有　 赣ICP备12002559号-2　 加入猎狗　 免责声明　 开放代码</p>
    </div>
</body>
<script type="text/javascript">
    var rightwidth = $('#menucontainer').width() - 400;
    $('#header_right_list').css('width', rightwidth);
    var stxt = document.getElementById('searchtext');
    stxt.value = '品牌、商品名';
    stxt.onfocus = function () { stxt.value = ''; stxt.style.color = 'black'; };
    $('#searchbtn').click(function () {
        if ($('#searchtext').val() == '' || $('#searchtext').val() == '品牌、商品名') {
            alert('搜索不能为空');
            return;
        }
        location.href = '@Href("~/q/")' + $('#searchtext').val();
    });
    $('#searchbtn').mousedown(function(){
        $('#searchbtn').attr('src','@Url.Content("~/Content/themes/base/images/searchbutton2.png")');
    })
    $('#searchbtn').mouseup(function () {
        $('#searchbtn').attr('src', '@Url.Content("~/Content/themes/base/images/searchbutton1.png")');
    })
</script>
</html>
